<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/template/main_login.xhtml">

	<ui:define name="body">
		<p:fieldset legend="#{messages['novousuario.caption']}">
			<h:form>
				<h:panelGrid columns="3">
					<h:outputLabel value="#{messages['usuario.label.nome']}: "
						for="nome" styleClass="text-input" />

					<h:inputText id="nome" value="#{novoUsuarioMB.nome}" maxlength="50">
						<f:validateRequired for="nome"></f:validateRequired>
						<f:validateLength for="nome" minimum="3"></f:validateLength>
					</h:inputText>

					<p:message for="nome" />
					<h:outputLabel value="#{messages['usuario.label.fone']}: "
						for="fone" styleClass="text-input" />

					<h:inputText id="fone" value="#{novoUsuarioMB.fone}" maxlength="12">
					<f:validateRequired for="fone"></f:validateRequired>
						<f:validateLength for="fone" minimum="8"></f:validateLength>
					</h:inputText>
					<p:message for="fone" />
					<h:outputLabel value="#{messages['usuario.label.login']}: "
						for="login" styleClass="text-input" />

					<h:inputText id="login" value="#{novoUsuarioMB.login}" maxlength="250"
						title="#{messages['usuario.alt.login']}">
						<f:validateRequired for="login"></f:validateRequired>
						<f:validateLength for="login" minimum="8"></f:validateLength>
					</h:inputText>

					<p:message for="login" />

					<h:outputLabel value="#{messages['usuario.label.senha']}: "
						for="senha" styleClass="text-input" />

					<h:inputSecret id="senha" value="#{novoUsuarioMB.senha}"
						title="#{messages['usuario.alt.senha']}" maxlength="20">
						<f:validateRequired for="senha"></f:validateRequired>
						<f:validateLength for="senha" minimum="3"></f:validateLength>
					</h:inputSecret>
					<p:message for="senha" />

					<h:outputLabel
						value="#{messages['usuario.label.confirma_senha']}: "
						for="confirma_senha" styleClass="text-input" />

					<h:inputSecret id="confirma_senha"
						value="#{novoUsuarioMB.confirmaSenha}"
						title="#{messages['usuario.alt.senha']}" maxlength="20">
						<f:validateRequired for="confirma_senha"></f:validateRequired>
						<f:validateLength for="confirma_senha" minimum="3"></f:validateLength>
					</h:inputSecret>

					<p:message for="confirma_senha" />

					<p:spacer />
					<p:spacer />

					<p:spacer />
					<h:commandButton value="#{messages['novousuario.enviar']}"
						action="#{novoUsuarioMB.cadastrarNew}" />
					
				</h:panelGrid>
			</h:form>
		</p:fieldset>
	</ui:define>

</ui:composition>